how to form differential equations